package com.flynn.rock.system.controller;

import com.flynn.rock.model.Response;
import com.flynn.rock.system.model.vo.RoleListVo;
import com.flynn.rock.system.service.SysRoleService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@AllArgsConstructor
@RequestMapping("/sys/role")
@Tag(name = "系统管理")
public class SysRoleController {

    private SysRoleService sysRoleService;

    @GetMapping("/list")
    @Operation(summary = "获取全部角色列表")
    public Response<List<RoleListVo>> getRoleList() {
        return Response.success(sysRoleService.getRoleList());
    }
}
